import { createRouter, createWebHashHistory } from "vue-router";
import HomeView from "../views/HomeView.vue";

const routes = [
  {
    path: "/",
    name: "home",
    component: HomeView,
  },
  {
    path: "/about",
    name: "about",
    // route level code-splitting
    // this generates a separate chunk (about.[hash].js) for this route
    // which is lazy-loaded when the route is visited.
    component: () =>
      import(/* webpackChunkName: "about" */ "../views/AboutView.vue"),
  },
  {
    path: "/drawhist",
    name: "drawhist",
    component: () => import("../views/draw/DrawHistView.vue"),
  },
  {
    path: "/drawpie",
    name: "drawpie",
    component: () => import("../views/draw/DrawPieView.vue"),
  },
  {
    path: "/drawline",
    name: "drawline",
    component: () => import("../views/draw/DrawLineView.vue"),
  },
  {
    path: "/csi300",
    name: "csi300",
    component: () => import("../views/csi300/CSI300View.vue"),
  },
  {
    path: "/getstock",
    name: "getstock",
    component: () => import("../views/stock/GetStock.vue"),
  },
  {
    path: "/stockinfo",
    name: "stockinfo",
    component: () => import("../views/stock/StockInfo.vue"),
  },
  {
    path: "/ranklist",
    name: "ranklist",
    component: () => import("../views/stock/RankList.vue"),
  },
  {
    path: "/industryRank",
    name: "industryRank",
    component: () => import("../views/stock/IndustryRank.vue"),
  },
];

const router = createRouter({
  history: createWebHashHistory(),
  routes,
});

export default router;
